f = open("timi.txt", "r")
hlauparar = []
for line in f.readlines():
	temp = line.split(" ")
	timi = int(temp[1])*60 + int(temp[2])
	hlauparar.append([temp[0], timi])

[hradasti, nafn] = [hlauparar[0][1], hlauparar[0][0]]

for hlaupari in hlauparar:
	if hlaupari[1] < hradasti:
		[hradasti, nafn] = [hlaupari[1], hlaupari[0]]
		
print(nafn + " var fljótastur")
